package weiyao.xinxidasai.Utils.ThreadLocal;

import weiyao.xinxidasai.pojo.Users;
 //简单用户线程

public class UserHolder {
    private static final ThreadLocal<Users> tl = new ThreadLocal<>();

    public static void saveUser(Users user){
        tl.set(user);
    }

    public static Users getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }

}
